using System;
using System.Collections;
using Rdl;

namespace GTame.ReportParser
{

    public class ColumnGroupingType
    {

        private GTame.ReportParser.DynamicColumnsRowsType _DynamicColumns;
        private System.Nullable<bool> _FixedHeader;
        private string _Height;
        private GTame.ReportParser.StaticColumnsType _StaticColumns;

        public GTame.ReportParser.DynamicColumnsRowsType DynamicColumns
        {
            get
            {
                if (_DynamicColumns == null)
                    _DynamicColumns = new GTame.ReportParser.DynamicColumnsRowsType();
                return _DynamicColumns;
            }
            set
            {
                _DynamicColumns = value;
            }
        }

        public System.Nullable<bool> FixedHeader
        {
            get
            {
                return _FixedHeader;
            }
            set
            {
                _FixedHeader = value;
            }
        }

        public string Height
        {
            get
            {
                return _Height;
            }
            set
            {
                _Height = value;
            }
        }

        public GTame.ReportParser.StaticColumnsType StaticColumns
        {
            get
            {
                if (_StaticColumns == null)
                    _StaticColumns = new GTame.ReportParser.StaticColumnsType();
                return _StaticColumns;
            }
            set
            {
                _StaticColumns = value;
            }
        }

        public ColumnGroupingType()
        {
            _FixedHeader = new System.Nullable<bool>[]();
        }

        public Rdl.ColumnGroupingType Write()
        {
            Rdl.ColumnGroupingType columnGroupingType = new Rdl.ColumnGroupingType();
            System.Collections.ArrayList arrayList = new System.Collections.ArrayList();
            if (_DynamicColumns != null)
                arrayList.Add(_DynamicColumns.Write());
            if (_FixedHeader.get_HasValue())
                arrayList.Add(_FixedHeader);
            if (_Height != null)
                arrayList.Add(_Height);
            if (_StaticColumns != null)
                arrayList.Add(_StaticColumns.Write());
            columnGroupingType.Items = arrayList.ToArray();
            arrayList = null;
            return columnGroupingType;
        }

    } // class ColumnGroupingType

}

